package cn.sunlelin.educationserver.service;

import cn.sunlelin.educationserver.entity.Course;
import com.github.pagehelper.Page;

import java.util.List;
import java.util.Map;

public interface CourseService {
    public void createCourse(Course course);
    public List<Map<String, Object>> findAll();
    public Map<String, Object> selectCourseById(Integer courseId);
    public List<Map<String,Object>> selectCourseByCoursetypeId(Integer coursetypeId);
    public List<Map<String,Object>> selectCourseByFathertypeId(Integer fathertypeId);

    public Page<Map<String,Object>> getPageSearch(Integer currentPage, Integer pageSize, String input,Integer sort);

    public Page<Map<String,Object>> getPageCourse(Integer currentPage, Integer pageSize);

    Page<Map<String,Object>> getPageByFathertypeId(Integer currentPage, Integer pageSize, Integer fathertypeId);

    public Page<Map<String,Object>> getPageByCoursetypeId(Integer currentPage, Integer pageSize, Integer coursetypeId);

    public Page<Map<String,Object>> getPageByUserId(Integer currentPage, Integer pageSize, Integer userId);

    public Boolean updateCourse(Course course);
    public Boolean updateScore(Integer courseId);

    public Boolean addAttendNum(Integer courseId);
    public Boolean deleteCourse(Integer courseId);
}
